package com.dabai.iot.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

/**
 * 服务端订阅消费关联表实体类
 *
 * @author kev1n
 */
@Data
@NoArgsConstructor
@TableName("iot_server_subscribe_consumer")
public class ServerSubscribeConsumerEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Schema(description = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 租户编号
     */
    @Schema(description = "租户编号")
    private String tenantId;

    /**
     * 产品id
     */
    @Schema(description = "产品id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long productId;

    /**
     * 订阅id
     */
    @Schema(description = "订阅id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long subscribeId;

    /**
     * 消费组id
     */
    @Schema(description = "消费组id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long consumerId;

}
